The Hebrews adopted the name "YHWH" (actually HWHY) from their neighbours.
YHWH was a minor warlike god, one of the pantheon of 70 gods ruled by the god name El. When the Hebrews adopted YHWH they gave him El's wife, Asherah. Archaeologists confirm this, as does the Biblical reference to the Asherah poles.
The Biblical records we read are of the group at Jerusalem who opposed that arrangement. They wanted only one god and they wanted all worship to be centred in Jerusalem. Any who opposed them is characterised as "evil", and the punishment at the hands of the mighty Babylonians was attributed by them to the actions of their opponents by worshiping Asherah, Ba'al, and so on.
Doug